package com.xh.demo.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import java.util.Date;

/**
 * @Name User
 * @Description
 * @Author wen
 * @Date 2019-12-07
 */
@Data
@ApiModel
public class User {

    @ApiModelProperty(notes = "主键ID")
    @Min(value = 10)
    private Long id;


    @ApiModelProperty(required = true, notes = "用户姓名")
    private String name;

    @ApiModelProperty(required = false,notes = "时间")
    @JsonFormat(pattern = "yyyy")
    private Date  cdate;

}
